// Setup compilation for an external piece of client code
#define ACCOUNTMANAGER_DLL_IMPORT

#include <utils/date/month.h>
#include <gui/main_window.h>
#include <gui/date/calendar.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>

#include <iostream>

#include <QApplication>
#include <QWidget>

using namespace AccountManagerUtils;
using namespace AccountManagerGui;

int main(int argc, char** argv) {
	// Create application
	QApplication app(argc, argv);

	QwtPlot* plot = new QwtPlot(QwtText("Da plot plot!"));
	QwtPlotCurve* curve = new QwtPlotCurve("test curve");
	double xdata[1000], ydata[1000];
	for ( int k = 0; k < 1000; ++k ) {
		xdata[k] = (double)k/200.0;
		ydata[k] = sin(xdata[k]);
	}
	curve->setSamples(xdata,ydata,1000);
	curve->attach(plot);
	curve->show();
	plot->show();

//	CalendarWidget* todo = new CalendarWidget();
//	todo->show();

	MainWindow* mw = new MainWindow();
	mw->show();

	MonthIndex index = Month::January;
	String month = Month::month_name(index);
	std::cout << "The " << (int)index << "-th month is " << month.toAscii().constData() << std::endl;

	// Run application
	return app.exec();
}
